package com.weixiaodong.javabasic.Java8提供的函数式编接口.Stream;


import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class StreamDemo {

    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("2");
        list.add("hello");
        list.add("1");
        list.add("world");
        System.out.println(list.stream().filter(item -> item.length() >= 2).collect(Collectors.joining("❤️")));
    }
}
